from os import system
import pandas as pd

class MyTranslator():
    def __init__(self, wordTableName):
        df = pd.read_excel(wordTableName,header=None)
        # 默认第一列英文，第二列中文
        df=df.rename(columns={0:'English',1:'Chinese'})
        df=df.set_index(df.columns[0])
        self.word_table=df

#test:
#translator = MyTranslator('files/wordTable.xlsx')  
#print(translator.word_table.at['Archer','Chinese'])